package lumis.portal.monitor;

import lumis.portal.stability.StableMinor;

/**
 * A type of measure that may be collected. A measure specified a kind of
 * data that is collected.
 * <p>
 * This interface contains the constants for standard measure keys.
 * </p>
 * @see lumis.portal.monitor
 * 
 * @stereotype entity
 * 
 * @version $Revision: 13093 $ $Date: 2011-05-28 18:40:18 -0300 (Sat, 28 May 2011) $
 * @since 4.1.0
 */
@StableMinor(version = "6.0", sinceVersion = "4.1")
public interface IMeasureType
{
	/**
	 * The key for the duration in milliseconds measure type.
	 * @since 4.1.0
	 */
	public static final String MEASURE_TYPE_DURATION_MS = "lumis.portal.monitor.mt.duration.ms";
	
	/**
	 * The key for the activity in milliseconds measure type.
	 * @since 4.1.0
	 */
	public static final String MEASURE_TYPE_ACTIVITY_MS = "lumis.portal.monitor.mt.activity.ms";
	
	/**
	 * The key for the size in bytes measure type.
	 * @since 4.1.0
	 */
	public static final String MEASURE_TYPE_SIZE_BYTE = "lumis.portal.monitor.mt.size.byte";
	
	/**
	 * The key for the size of html in bytes measure type.
	 * @since 6.0.0
	 */
	public static final String MEASURE_TYPE_HTML_SIZE = "lumis.portal.monitor.mt.size.html";
	
	/**
	 * The key for the size of xml in bytes measure type.
	 * @since 6.0.0
	 */
	public static final String MEASURE_TYPE_XML_SIZE = "lumis.portal.monitor.mt.size.xml";
	
	/**
	 * The key for the transaction commit measure type.
	 * @since 4.1.0
	 */
	public static final String MEASURE_TYPE_TRANSACTION_COMMIT = "lumis.portal.monitor.mt.transaction.commit";
	
	/**
	 * The key for the transaction rollback measure type.
	 * @since 4.1.0
	 */
	public static final String MEASURE_TYPE_TRANSACTION_ROLLBACK = "lumis.portal.monitor.mt.transaction.rollback";

	/**
	 * Returns the identifier for this measure type.
	 * @return the identifier for this measure type.
	 * @since 4.1.0
	 */
	public String getId();

	/**
	 * Returns the description for this measure type. The description is localizable
	 * using {@link #getStringResourcePath()}.
	 * @return the description for this measure type.
	 * @since 4.1.0
	 */
	public String getDescription();

	/**
	 * Sets the description for this measure type.
	 * @param description the description to set.
	 * @see #getDescription()
	 * @since 4.1.0
	 */
	public void setDescription(String description);

	/**
	 * Returns the name for this measure type. The name is localizable
	 * using {@link #getStringResourcePath()}.
	 * @return the name for this measure type.
	 * @since 4.1.0
	 */
	public String getName();

	/**
	 * Sets the name for this measure type.
	 * @param name the name to set.
	 * @see #getName()
	 * @since 4.1.0
	 */
	public void setName(String name);

	/**
	 * Returns the unit display name for this measure type. The unit is localizable
	 * using {@link #getStringResourcePath()}.
	 * @return the unit display name for this measure type.
	 * @since 4.1.0
	 */
	public String getUnit();

	/**
	 * Sets the unit display name for this measure type.
	 * @param unit the unit display name to set.
	 * @see #getUnit()
	 * @since 4.1.0
	 */
	public void setUnit(String unit);
	
	/**
	 * The string resource path for localizing this measure type's strings.
	 * @return the string resource path. 
	 * @since 4.1.0
	 */
	public String getStringResourcePath();
	/**
	 * Sets the string resource path for this measure type.
	 * @param stringResourcePath the string resource path.
	 * @see #getStringResourcePath()
	 * @since 4.1.0
	 */
	public void setStringResourcePath(String stringResourcePath);
	
	/**
	 * Returns the key for this measure type. This key is a friendly unique 
	 * identifier for this measure type.
	 * @return this measure type's key.
	 * @since 4.1.0
	 */
	public String getMeasureTypeKey();

	/**
	 * Sets the key for this measure type.
	 * @param key the key.
	 * @see #getMeasureTypeKey()
	 * @since 4.1.0
	 */
	public void setMeasureTypeKey(String key);
}